package com.newdream.annotation.controller;

import com.newdream.annotation.annotation.NeedSetFieldValue;
import com.newdream.annotation.model.Order;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author: sanglei
 * @date: 2019-02-13 14:10
 * @description:
 */
@RestController
@RequestMapping("order")
public class OrderController {
    @PostMapping("query")
    @NeedSetFieldValue
    public String query(HttpServletRequest request, @RequestBody Order order){
        System.out.println("unitId:"+order.getUnitId());
        System.out.println("查询方法调用");
        return "ssss";
    }
}
